package io.gitee.sfch.chunmi.service.system;

import io.gitee.sfch.chunmi.auth.AuthenticationService;
import io.gitee.sfch.chunmi.controller.system.form.SystemLoginForm;
import io.gitee.sfch.chunmi.dao.system.entity.SystemUser;
import jakarta.servlet.http.HttpServletRequest;

/**
 * 登录服务
 */
public interface LoginService extends AuthenticationService {

    /**
     * 登录
     *
     * @param form 登录表单
     * @param servletRequest 请求
     */
    void login(SystemLoginForm form, HttpServletRequest servletRequest);

    /**
     * 登出
     *
     * @param servletRequest 请求
     */
    void logout(HttpServletRequest servletRequest);

    /**
     * 从Session中获取用户信息
     */
    SystemUser getSessionUser(HttpServletRequest servletRequest);
}
